    <?php $this->load->view('wedding/wedding_head');?>
    <script type='text/javascript'>
    	function check_pass(){
        	//使用ajax判断密码是否正确
    		$.post('ajax_check_pass', {pass:$('#pass').val()}, function(data) {
        		if (data.length > 3){
					//看来是密码错误啊
        			$('#pass_error').attr('class','error');
					$('#pass_error').html('原密码不正确');
            		}else {
            			$('#pass_error').attr('class','moreInfo');
    					$('#pass_error').html('');

                		}
    		});

        	}
    	function check_npass(){
    		var npass = $('#npass').val();
    		if (npass.length < 6){
    			$('#npass_error').attr('class','error');
    			$('#npass_error').html('密码应该在6-20个字符之间');
    		}else {
    		if (npass.length > 20){
    			$('#npass_error').attr('class','error');
    			$('#npass_error').html('密码应该在6-20个字符之间');
    			} else {
    					$('#npass_error').attr('class','moreInfo');
    					$('#npass_error').html('');
    			
    				}
    		}

        	}
    	function check_rpass(){
    		if($('#npass').val()!=$('#rpass').val()){
    			$('#rpass_error').attr('class','error');
    			$('#rpass_error').html('两次输入的密码不一致');
    			} else {
    				$('#rpass_error').attr('class','moreInfo');
    				$('#rpass_error').html('');
    				}

        	}
    	function check_all(){
    		check_rpass();
    		check_npass();
    		check_pass();
    		var pass_error = $('#pass_error').html();
    		var npass_error = $('#npass_error').html();
    		var rpass_error = $('#rpass_error').html();
    		if (pass_error.length > 3 || npass_error.length > 3 || rpass_error.length > 3) {return false;} else {return true;}
        	}
    </script>
 <input type="hidden" id="page_code" value="2"/>
    <!-- begin: main content area #main -->
     <div id="main">
      <!-- begin: #col1 - first float column -->
      <div id="col1" role="complementary">
        <?php $this->load->view('wedding/wedding_left_nav.php')?>
      </div>
      <!-- end: #col1 -->
      <!-- begin: #col3 static column -->
      <div id="col3" role="main">
        <div id="col3_content" class="clearfix">
           
           <div class="my_box">
            <p class="box_title"><span>婚庆公司基本信息管理</span></p>
          	<form onsubmit='return check_all()' enctype='multipart/form-data' action="<?php echo base_url();?>index.php/wedding/WeddingManagerAction/change_password" method="post">
          		<input type="hidden" id="hidden_action" name="action"/>
	            <div style="color:red;margin:20px;"></div>  	
	          	<ul class="userInfo" style="margin-top:20px">
	          		<?php if (isset ($form_error)){echo $form_error;}; ?>
	          		<li>
	          			<span class="label">*原密码</span>
		         		<input type="password" onblur='check_pass()' id='pass' name="pass" size="10" value=""/> 
		         		<span id='pass_error' class="moreInfo">输入您原来的密码</span>		
	         		</li>
	          		<li>
	          			<span class="label">*新密码</span>
		         		<input type="password" onblur='check_npass()' id='npass' name="npass" size="10" value=""/> 
		         		<span id='npass_error' class="moreInfo">输入您希望使用的密码</span>		
	         		</li>
	         		<li>
	          			<span class="label">*确认密码</span>
		         		<input type="password" onblur='check_rpass()' id='rpass' name="rpass" size="10" value=""/> 
		         		<span id='rpass_error' class="moreInfo">确认输入您的新密码</span>		
	         		</li>
	          		
	         		
	          		<li><input type='submit' value='提交'></li>
	          	</ul>
	          
          	</form>
          </div>
        </div>
        <div id="ie_clearing">&nbsp;</div>
        <!-- End: IE Column Clearing -->
      </div>
      <!-- end: #col3 -->
    </div>
   
    <!-- end: #main -->
<?php $this->load->view('user/footer');?>